
import 'package:flutter/material.dart';
import 'drawer_demo.dart';
import 'bottomNavigationBar_demo.dart';
import 'listViewDemo.dart';
import 'textTest_demo.dart';
import 'layout_demo.dart';
import 'view_demo.dart';
import 'sliver_demo.dart';


class Home extends StatelessWidget{
  
 Widget build(BuildContext context){ 
  return DefaultTabController(
    length: 4, 
    child: Scaffold(
       appBar: AppBar(
          //  leading:IconButton(
          //    icon: Icon(Icons.menu),
          //    tooltip: 'Navigration',
          //    onPressed: ()=>debugPrint('Navigration'),
          //  ),
           actions: <Widget>[
            IconButton(
             icon: Icon(Icons.search),
             tooltip: 'search',
             onPressed: ()=>debugPrint('search'),
            )
           ],
           title:Text('nihao flutter 123456'),
           elevation: 10.0,
        bottom: TabBar(
        unselectedLabelColor: Colors.red,
        labelColor: Colors.yellow,
        indicatorColor: Colors.red,
        indicatorSize: TabBarIndicatorSize.label,
        indicatorWeight: 1.0,
        tabs:<Widget>[
        Tab(icon:Icon(Icons.local_florist)),
        Tab(icon:Icon(Icons.directions_bus)),
        Tab(icon:Icon(Icons.directions_bike)),
        Tab(icon:Icon(Icons.view_quilt)),
        ]),
      
    ),  
     body: TabBarView(
      children: <Widget>[
        listViewDemo(),
        textTestDemo(),
        layoutDemo(),
        SliverDemo(),
      ],
    ),
    drawer: Drawerdemo(),
    bottomNavigationBar: BottomNavigationBarDemo()
     ),
  );
 }
  

}

